//
//  FMViewController.m
//  DolphinMusic
//
//  Created by dllo on 15/3/21.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "FMViewController.h"
#import "UIColor+AddColor.h"
#import "TypeViewController.h"
#import "KindOfViewController.h"
#import "FMView.h"
#import "FMAlbum.h"
#import "HandData.h"
#import "Flag.h"
#import "AlbumViewController.h"

#define HEIGHT (VIEW_HEIGHT - 64 - 66 - (70.0 / 667) * VIEW_HEIGHT) / 3
#define PROGRAMME_HEIGHT HEIGHT / 3

NSString *colorStr = @"#fffffb";

@interface FMViewController ()

@property (nonatomic, retain)UIView *view1;
@property (nonatomic, retain)UIView *view2;
@property (nonatomic, retain)UIView *view3;

@end

CGFloat bbbb = 70.0 / 667;

@implementation FMViewController

- (void)dealloc
{
    [_view1 release];
    [_view2 release];
    [_view3 release];
    [super dealloc];
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.buttonView.frame = self.FMButton.frame;
    [self.localButton addTarget:self action:@selector(localButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.netButton addTarget:self action:@selector(netButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    
    [self.searchButton addTarget:self action:@selector(searchButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.settingButton addTarget:self action:@selector(settingButtonAction:) forControlEvents:UIControlEventTouchUpInside];
/***************** 上面勿动 ***************/
    
    UIWindow *window = [[[UIApplication sharedApplication] windows] firstObject];
    PlayView *playView = (PlayView*)[window viewWithTag:10001];
    playView.target = self.navigationController;
    
    [self setView1];
    [self setView2];
    [self setView3];
    
    
}

- (void)setView1
{
    self.view1 = [[UIView alloc] initWithFrame:CGRectMake(10, 74, VIEW_WIDTH - 20, HEIGHT)];
    self.view1.backgroundColor = [UIColor colorFromHexCode:colorStr];
    self.view1.layer.cornerRadius = 9;
    [self.view addSubview:self.view1];
    [_view1 release];
    
    UIImageView *imageView1 = [[UIImageView alloc] initWithFrame:CGRectMake(5, 40, HEIGHT - 40, HEIGHT - 40)];
    imageView1.image = [UIImage imageNamed:@"guilunmei.jpg"];
    imageView1.userInteractionEnabled = YES;
    [self.view1 addSubview:imageView1];
    [imageView1 release];
    
    UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap1Action:)];
    [imageView1 addGestureRecognizer:tap1];
    [tap1 release];
    
    UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, HEIGHT - 20, 30)];
    if (VIEW_WIDTH < 370)
    {
        label1.font = [UIFont systemFontOfSize:14];
    }
    label1.text = @"海豚音悦台";
    label1.textAlignment = NSTextAlignmentCenter;
    [self.view1 addSubview:label1];
    [label1 release];

    UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
    button.frame = CGRectMake(VIEW_WIDTH - 120, 10, 70, 20);
    [button setTitle:@"全部音乐" forState:UIControlStateNormal];
    button.tintColor = [UIColor blackColor];
    [button addTarget:self action:@selector(allMusicbuttonAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view1 addSubview:button];
    
    UIImageView *nextImageView = [[UIImageView alloc] initWithFrame:CGRectMake(VIEW_WIDTH - 45, 10, 20, 20)];
    nextImageView.image = [UIImage imageNamed:@"arrowNext.png"];
    [self.view1 addSubview:nextImageView];
    [nextImageView release];
    
    [self setContent11];
    
}

- (void)tap1Action:(UITapGestureRecognizer *)tap
{
    TypeViewController *typeVC = [[TypeViewController alloc] init];
    typeVC.address = @"http://mobile.ximalaya.com/m/category_tag_list?device=android&per_page=100&category=music&type=album&page=1";
    typeVC.type = @"音乐";
    [self.navigationController pushViewController:typeVC animated:YES];
    [typeVC release];

}

- (void)allMusicbuttonAction:(UIButton *)button
{
    TypeViewController *typeVC = [[TypeViewController alloc] init];
    typeVC.address = @"http://mobile.ximalaya.com/m/category_tag_list?device=android&per_page=100&category=music&type=album&page=1";
    typeVC.type = @"音乐";
    [self.navigationController pushViewController:typeVC animated:YES];
    [typeVC release];
}



- (void)setContent11
{
    
    NSString *str = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/259608/true/1/15";
    [HandData handDataWithAddress:str complition:^(FMAlbum *album) {
        
        
        
        
        FMView *fmView = [[FMView alloc] initWithFrame:CGRectMake(VIEW_WIDTH, 30 , VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT)];
        fmView.album = album;
        UITapGestureRecognizer *tap111 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap111Action:)];
        [fmView.view1 addGestureRecognizer:tap111];
        [tap111 release];
        
        
        
        [self.view1 addSubview:fmView];
        [fmView release];
        
        [UIView transitionWithView:fmView duration:1 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
            fmView.frame = CGRectMake(5 + HEIGHT - 40, 30, VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT);
        } completion:^(BOOL finished) {
            [self setContent12];
        }];
        
    }];
    
}

- (void)setContent12
{
    NSString *str = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/232404/true/1/15";
    [HandData handDataWithAddress:str complition:^(FMAlbum *album) {
        FMView *fmView = [[FMView alloc] initWithFrame:CGRectMake(VIEW_WIDTH, 30 + PROGRAMME_HEIGHT - 5 , VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT)];
        fmView.album = album;
        
        UITapGestureRecognizer *tap112 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap112Action:)];
        [fmView.view1 addGestureRecognizer:tap112];
        [tap112 release];
        
        [self.view1 addSubview:fmView];
        [fmView release];
        
        [UIView transitionWithView:fmView duration:1 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
            fmView.frame = CGRectMake(5 + HEIGHT - 40, 30 + PROGRAMME_HEIGHT - 5, VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT);
        } completion:^(BOOL finished) {
            [self setContent13];
        }];
    }];
    
}

- (void)setContent13
{
    
    NSString *str = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/232829/true/1/15";
    
    [HandData handDataWithAddress:str complition:^(FMAlbum *album) {
        FMView *fmView = [[FMView alloc] initWithFrame:CGRectMake(VIEW_WIDTH, 30 + (PROGRAMME_HEIGHT - 5) * 2, VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT)];
        fmView.album = album;
        
        UITapGestureRecognizer *tap113 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap113Action:)];
        [fmView.view1 addGestureRecognizer:tap113];
        [tap113 release];
        
        
        [self.view1 addSubview:fmView];
        [fmView release];
        
        [UIView transitionWithView:fmView duration:1 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
            fmView.frame = CGRectMake(5 + HEIGHT - 40, 30 + (PROGRAMME_HEIGHT - 5) * 2, VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT);
        } completion:^(BOOL finished) {
           
        }];
        
    }];
    
}



- (void)setView2
{
    self.view2 = [[UIView alloc] initWithFrame:CGRectMake(10, 74 + HEIGHT + 20, VIEW_WIDTH - 20, HEIGHT)];
    self.view2.backgroundColor = [UIColor colorFromHexCode:colorStr];
    self.view2.layer.cornerRadius = 7;
    [self.view addSubview:self.view2];
    [self.view2 release];
    
    UIImageView *imageView1 = [[UIImageView alloc] initWithFrame:CGRectMake(VIEW_WIDTH - 15 - HEIGHT + 40, 40, HEIGHT - 40, HEIGHT - 40)];
    imageView1.image = [UIImage imageNamed:@"yaoming.jpg"];
    imageView1.userInteractionEnabled = YES;
    [self.view2 addSubview:imageView1];
    [imageView1 release];
    
    UITapGestureRecognizer *tap2 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap2Action:)];
    [imageView1 addGestureRecognizer:tap2];
    [tap2 release];
    
    UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(VIEW_WIDTH - 5 - HEIGHT + 40, 0, HEIGHT - 40, 30)];
    label1.text = @"海豚段子";
    if (VIEW_WIDTH < 370)
    {
        label1.font = [UIFont systemFontOfSize:14];
    }
    label1.textAlignment = NSTextAlignmentCenter;
    [self.view2 addSubview:label1];
    [label1 release];
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
    button.frame = CGRectMake(25, 5, 70, 20);
    [button setTitle:@"全部段子" forState:UIControlStateNormal];
    button.tintColor = [UIColor blackColor];
    [button addTarget:self action:@selector(allJokeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view2 addSubview:button];
    
    UIImageView *nextImageView = [[UIImageView alloc] initWithFrame:CGRectMake(5, 5, 20, 20)];
    nextImageView.image = [UIImage imageNamed:@"arrowNext1.png"];
    [self.view2 addSubview:nextImageView];
    [nextImageView release];
    
    
    [self setContent21];
    
}

- (void)tap2Action:(UITapGestureRecognizer *)tap
{
    KindOfViewController *kindOfVC = [[KindOfViewController alloc] init];
    kindOfVC.address = @"http://mobile.ximalaya.com/m/explore_album_list?category_name=entertainment&condition=hot&device=android&page=1&per_page=20&status=0&tag_name=笑话段子";
    kindOfVC.myTitle = @"笑话段子";
    kindOfVC.type = @"笑话段子";
    [self.navigationController pushViewController:kindOfVC animated:YES];
    [kindOfVC release];
}

- (void)allJokeButtonAction:(UIButton *)button
{
    KindOfViewController *kindOfVC = [[KindOfViewController alloc] init];
    kindOfVC.address = @"http://mobile.ximalaya.com/m/explore_album_list?category_name=entertainment&condition=hot&device=android&page=1&per_page=20&status=0&tag_name=笑话段子";
    kindOfVC.myTitle = @"笑话段子";
    kindOfVC.type = @"笑话段子";
    [self.navigationController pushViewController:kindOfVC animated:NO];
    [kindOfVC release];
    
}

- (void)setContent21
{
    NSString *str = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/203355/true/1/15";
    
    [HandData handDataWithAddress:str complition:^(FMAlbum *album) {
        FMView *fmView = [[FMView alloc] initWithFrame:CGRectMake(- VIEW_WIDTH, 30 , VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT)];
        
        fmView.album = album;
        
        UITapGestureRecognizer *tap211 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap211Action:)];
        [fmView.view1 addGestureRecognizer:tap211];
        [tap211 release];
        
        
        [self.view2 addSubview:fmView];
        [fmView release];
        
        [UIView transitionWithView:fmView duration:1 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
            fmView.frame = CGRectMake(5 , 30, VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT);
        } completion:^(BOOL finished) {
            [self setContent22];
        }];
        
    }];

}

- (void)setContent22
{
    
    NSString *str = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/222885/true/1/15";
    
    [HandData handDataWithAddress:str complition:^(FMAlbum *album) {
        FMView *fmView = [[FMView alloc] initWithFrame:CGRectMake(- VIEW_WIDTH, 30 + PROGRAMME_HEIGHT - 5 , VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT)];
        fmView.album = album;
        [self.view2 addSubview:fmView];
        
        UITapGestureRecognizer *tap212 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap212Action:)];
        [fmView.view1 addGestureRecognizer:tap212];
        [tap212 release];
        
        [fmView release];
        
        [UIView transitionWithView:fmView duration:1 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
            fmView.frame = CGRectMake(5 , 30 + PROGRAMME_HEIGHT - 5, VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT);
        } completion:^(BOOL finished) {
            [self setContent23];
        }];
        
    }];
    
}

- (void)setContent23
{
    NSString *str = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/249020/true/1/15";
    
    [HandData handDataWithAddress:str complition:^(FMAlbum *album) {
        FMView *fmView = [[FMView alloc] initWithFrame:CGRectMake(- VIEW_WIDTH, 30 + (PROGRAMME_HEIGHT - 5) * 2 , VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT)];
        fmView.album = album;
        
        UITapGestureRecognizer *tap213 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap213Action:)];
        [fmView.view1 addGestureRecognizer:tap213];
        [tap213 release];
        
        [self.view2 addSubview:fmView];
        [fmView release];
        
        [UIView transitionWithView:fmView duration:1 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
            fmView.frame = CGRectMake(5 , 30 + (PROGRAMME_HEIGHT - 5) * 2, VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT);
        } completion:^(BOOL finished) {
        
        }];
        
    }];

}


- (void)setView3
{
    self.view3 = [[UIView alloc] initWithFrame:CGRectMake(10, 74 + 20 + 20 + 2 * HEIGHT, VIEW_WIDTH - 20, HEIGHT)];
    self.view3.backgroundColor = [UIColor colorFromHexCode:colorStr];
    self.view3.layer.cornerRadius = 7;
    [self.view addSubview:self.view3];
    [self.view3 release];
    
    UIImageView *imageView1 = [[UIImageView alloc] initWithFrame:CGRectMake(5, 40, HEIGHT - 40, HEIGHT - 40)];
    imageView1.image = [UIImage imageNamed:@"xinwenlianbo.jpg"];
    imageView1.userInteractionEnabled = YES;
    [self.view3 addSubview:imageView1];
    [imageView1 release];
    
    UITapGestureRecognizer *tap3 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap3Action:)];
    [imageView1 addGestureRecognizer:tap3];
    [tap3 release];
    
    UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, HEIGHT - 40, 30)];
    label1.text = @"海豚新闻";
    if (VIEW_WIDTH < 370)
    {
        label1.font = [UIFont systemFontOfSize:14];
    }
    label1.textAlignment = NSTextAlignmentCenter;
    [self.view3 addSubview:label1];
    [label1 release];
 
    UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
    button.frame = CGRectMake(VIEW_WIDTH - 120, 10, 70, 20);
    [button setTitle:@"全部新闻" forState:UIControlStateNormal];
    button.tintColor = [UIColor blackColor];
    [self.view3 addSubview:button];
    [button addTarget:self action:@selector(allNewsButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    
    UIImageView *nextImageView = [[UIImageView alloc] initWithFrame:CGRectMake(VIEW_WIDTH - 45, 10, 20, 20)];
    nextImageView.image = [UIImage imageNamed:@"arrowNext.png"];
    [self.view3 addSubview:nextImageView];
    [nextImageView release];
    
    
    [self setContent31];
    
    
}

- (void)tap3Action:(UITapGestureRecognizer *)tap
{
    TypeViewController *typeVC = [[TypeViewController alloc] init];
    typeVC.address = @"http://mobile.ximalaya.com/m/category_tag_list?device=android&per_page=100&category=news&type=album&page=1";
    typeVC.type = @"新闻资讯";
    [self.navigationController pushViewController:typeVC animated:YES];
    [typeVC release];

}

- (void)allNewsButtonAction:(UIButton *)button
{
    TypeViewController *typeVC = [[TypeViewController alloc] init];
    typeVC.address = @"http://mobile.ximalaya.com/m/category_tag_list?device=android&per_page=100&category=news&type=album&page=1";
    typeVC.type = @"新闻资讯";
    [self.navigationController pushViewController:typeVC animated:YES];
    [typeVC release];
}

- (void)setContent31
{
    NSString *str = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/268595/true/1/15";
    
    [HandData handDataWithAddress:str complition:^(FMAlbum *album) {
       
        FMView *fmView = [[FMView alloc] initWithFrame:CGRectMake(5 + HEIGHT - 40, HEIGHT + 20, VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT)];
        fmView.album = album;
        
        UITapGestureRecognizer *tap311 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap311Action:)];
        [fmView.view1 addGestureRecognizer:tap311];
        [tap311 release];
        
        [self.view3 addSubview:fmView];
        [fmView release];
        
        [UIView transitionWithView:fmView duration:1 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
            fmView.frame = CGRectMake(5 + HEIGHT - 40, 30, VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT);
        } completion:^(BOOL finished) {
            [self setContent32];
        }];
    }];
}

- (void)setContent32
{
    NSString *str = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/315887/true/1/15";
    
    [HandData handDataWithAddress:str complition:^(FMAlbum *album) {
        FMView *fmView = [[FMView alloc] initWithFrame:CGRectMake(5 + HEIGHT - 40, HEIGHT + 20, VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT)];
        fmView.album = album;
        
        UITapGestureRecognizer *tap312 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap312Action:)];
        [fmView.view1 addGestureRecognizer:tap312];
        [tap312 release];
        
        [self.view3 addSubview:fmView];
        [fmView release];
        
        [UIView transitionWithView:fmView duration:1 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
            fmView.frame = CGRectMake(5 + HEIGHT - 40, 30 + PROGRAMME_HEIGHT - 5, VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT);
        } completion:^(BOOL finished) {
            [self setContent33];
        }];
    }];
    
}

- (void)setContent33
{
    NSString *str = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/16428/true/1/15";
    
    [HandData handDataWithAddress:str complition:^(FMAlbum *album) {
        FMView *fmView = [[FMView alloc] initWithFrame:CGRectMake(5 + HEIGHT - 40, HEIGHT + 20, VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT)];
        fmView.album = album;
        
        UITapGestureRecognizer *tap313 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap313Action:)];
        [fmView.view1 addGestureRecognizer:tap313];
        [tap313 release];
        
        [self.view3 addSubview:fmView];
        [fmView release];
        
        [UIView transitionWithView:fmView duration:1 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
            fmView.frame = CGRectMake(5 + HEIGHT - 40, 30 + (PROGRAMME_HEIGHT - 5) * 2, VIEW_WIDTH - 20 - (5 + HEIGHT - 40), PROGRAMME_HEIGHT);
        } completion:^(BOOL finished) {
        }];
    }];

}

- (void)tap111Action:(UITapGestureRecognizer *)tap111
{
    AlbumViewController *albumVC = [[AlbumViewController alloc] init];
    albumVC.address = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/259608/true/1/15";
    albumVC.albumID = @"259608";
    albumVC.title11 = @"音乐大明星";
    [self.navigationController pushViewController:albumVC animated:YES];
}

- (void)tap112Action:(UITapGestureRecognizer *)tap112
{
    AlbumViewController *albumVC = [[AlbumViewController alloc] init];
    albumVC.address = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/232404/true/1/15";
    albumVC.albumID = @"232404";
    albumVC.title11 = @"叶蓝怀旧经典2014";
    [self.navigationController pushViewController:albumVC animated:YES];
}



- (void)tap113Action:(UITapGestureRecognizer *)tap113
{
    AlbumViewController *albumVC = [[AlbumViewController alloc] init];
    albumVC.address = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/232829/true/1/15";
    albumVC.albumID = @"232829";
    albumVC.title11 = @"音乐故事";
    [self.navigationController pushViewController:albumVC animated:YES];
}

- (void)tap211Action:(UITapGestureRecognizer *)tap211
{
    AlbumViewController *albumVC = [[AlbumViewController alloc] init];
    albumVC.address = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/203355/true/1/15";
    albumVC.albumID = @"203355";
    albumVC.title11 = @"段子来了";
    [self.navigationController pushViewController:albumVC animated:YES];
}

- (void)tap212Action:(UITapGestureRecognizer *)tap212
{
    AlbumViewController *albumVC = [[AlbumViewController alloc] init];
    albumVC.address = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/222885/true/1/15";
    albumVC.albumID = @"222885";
    albumVC.title11 = @"非常不着调";
    [self.navigationController pushViewController:albumVC animated:YES];
}

- (void)tap213Action:(UITapGestureRecognizer *)tap213
{
    AlbumViewController *albumVC = [[AlbumViewController alloc] init];
    albumVC.address = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/249020/true/1/15";
    albumVC.albumID = @"249020";
    albumVC.title11 = @"非常溜+7";
    [self.navigationController pushViewController:albumVC animated:YES];
}


- (void)tap311Action:(UITapGestureRecognizer *)tap311
{
    AlbumViewController *albumVC = [[AlbumViewController alloc] init];
    albumVC.address = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/268595/true/1/15";
    albumVC.albumID = @"268595";
    albumVC.title11 = @"国内热点";
    [self.navigationController pushViewController:albumVC animated:YES];
}

- (void)tap312Action:(UITapGestureRecognizer *)tap312
{
    AlbumViewController *albumVC = [[AlbumViewController alloc] init];
    albumVC.address = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/315887/true/1/15";
    albumVC.albumID = @"315887";
    albumVC.title11 = @"体坛快报";
    [self.navigationController pushViewController:albumVC animated:YES];
}

- (void)tap313Action:(UITapGestureRecognizer *)tap313
{
    AlbumViewController *albumVC = [[AlbumViewController alloc] init];
    albumVC.address = @"http://mobile.ximalaya.com/mobile/others/ca/album/track/16428/true/1/15";
    albumVC.albumID = @"16428";
    albumVC.title11 = @"电影不无聊";
    [self.navigationController pushViewController:albumVC animated:YES];
}




/*********************** 中间勿动 ************************/
- (void)localButtonAction:(UIButton *)button
{
    [self.tabBarController setSelectedIndex:0];
}
- (void)netButtonAction:(UIButton *)button
{
    [self.tabBarController setSelectedIndex:1];
}
- (void)searchButtonAction:(UIButton *)button
{
    Flag *flag = [Flag shareInstance];
    flag.flag = 2;
    [self.tabBarController setSelectedIndex:3];
}
- (void)settingButtonAction:(UIButton *)button
{
    [self.tabBarController setSelectedIndex:4];
}
/*********************** 中间勿动 ************************/


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void)viewWillAppear:(BOOL)animated
{
    UIWindow *window = [[UIApplication sharedApplication] keyWindow];
    UIButton *button = (UIButton *)[window viewWithTag:1000];
    button.hidden = NO;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
